#ifndef __STDSQLITE_H_
#define __STDSQLITE_H_

#include "DoubleLinkList.h"
struct StdSqlite;
typedef struct StdSqlite SQL;

SQL*InitSqlite(const char *filename);
void CreateTable(SQL*s,const char *tableName,char **prolist,int row);
void DeleteTable(SQL*s,const char *tableName);
void ClearDataTable(SQL *s,const char *tableName);
void InsertData(SQL*s,const char *tableName,char **values,int size);
void InsertData2(SQL*s,const char *tableName,char **values,int size);
void DeleteData(SQL *s,const char *tableName,const char *where);
void UpdateData(SQL *s,const char *tableName,const char *SetValue,const char *where);
void GetTableInfo(SQL*s,const char *tableName,char ***result,int *row,int *column);
void SelectInfo(SQL *s,const char *sql,char ***result,int *row,int *column);
char *GetTableData(SQL *s, const char *tableName,char *account,char *passwd);//登录匹配账号，密码
char *GetTableData2(SQL *s, const char *tableName,char *account);//注册匹配账号
//char * MatchAccount(SQL *s, const char *tableName,char *account,char ***result);
void PrintTableData(SQL *s,const char *tableName);
void DeleteTableAccount(SQL *s, const char *tableName,char *account,char *passwd);
void DeleteOnlineData(SQL *s,const char *tableName,char *FromName);

int CheckTableExists(SQL* s, const char* tableName);


void FreeInfoReault(char **result);
int GetTableLen(SQL *s,const char *tableName);
int IsTableEmpty(SQL *s,const char *tableName);

void FreeSqlite(SQL *s);

#endif